﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="menu.aspx.cs" Inherits="Backend_menu" %>

<%@ Import Namespace="Wsitech.Model" %>
<%@ Import Namespace="Wsitech.BLL" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html" />
    <title>管理页面</title>
    <link href="!css/frame.css" rel="stylesheet" type="text/css" />
    <script src="!js/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="!js/default.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(function () {
            var index = Cookies.get('p_menuIndex') == "" ? 0 : Cookies.get('p_menuIndex');

            $('#container .content').hide().eq(index).slideDown();

            $('#container .type').each(function (i) {
                $(this).click(function () {
                    if (i != index) {
                        $('#container .type').eq(index).next('.content').slideUp();
                        $(this).next('.content').slideDown();
                        index = i;
                        Cookies.set('p_menuIndex', index);
                    }
                });
            });
        });
    </script>
</head>
<body>
    <table width="100%" height="280" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF2FB">
        <tr>
            <td width="182" valign="top">
                <div id="container">
                    <asp:Repeater runat="server" ID="repPMenu">
                        <ItemTemplate>
                            <h1 class="type">
                                <a href="javascript:void(0)">
                                    <%#(Container.DataItem as SiteMapInfo).SitemapName %></a>
                            </h1>
                            <div class="content">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <img src="images/menu_topline.gif" width="182" height="5" />
                                        </td>
                                    </tr>
                                </table>
                                <ul class="MM">
                                    <asp:Repeater ID="repMenu" runat="server" DataSource="<%#(getSiteMapByPid((Container.DataItem as SiteMapInfo).SitemapId)) %>">
                                        <ItemTemplate>
                                            <li><a href="<%#getBackUrl(Container.DataItem as Wsitech.Model.SiteMapInfo) %>" target="main">
                                                <%#(Container.DataItem as Wsitech.Model.SiteMapInfo).SitemapName %></a></li>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>
